package com.hptpd.questionnairesurvey.repository;

import com.hptpd.questionnairesurvey.domain.Questionnaire;
import com.hptpd.questionnairesurvey.domain.Survey;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
 * \* Created with IntelliJ IDEA.
 * \* Date: 2019/10/23
 * \*
 * \* Description:
 * \
 *
 * @author walter_long
 */
@Repository("surveyRep")
public interface SurveyRep extends JpaRepository<Survey, String> {
    /**
     * 分页列出调查
     * @param name String
     * @param pageable Pageable
     * @return Page<Survey>
     */
    Page<Survey> findByNameContainsOrderByCreatedAtDesc(String name, Pageable pageable);
}
